package com.demo.controllers;

import com.demo.base.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by 郭良艺 on 2017/5/23.
 */
@Controller
@RequestMapping("/")
public class demoController extends BaseController{

    @RequestMapping("index.page")
    public String index(){
        return "/demo/index";
    }

    @RequestMapping("/loginFailure.page")
    public String loginFailure(Model model){
        model.addAttribute("msg","登陆失败！");
        return  "demo/success";
    }

    @RequestMapping("/loginSuccess.page")
    public String loginSuccess(Model model){
        model.addAttribute("msg","登陆成功！");
        return  "demo/success";
    }


}
